import router from "@/router/router"

export default {


    //跳转到番剧详情
    toAnimationDetails(id, type) {
        window.open(router.resolve({
            path: '/DetailPage',
            query: {
                id: id,
                type: type,
                page: 1,
            }
        }).href, '_blank');
    },

    //跳转到文章或动态详情
    toADDetails(id, type) {
        window.open(router.resolve({
            path: '/ContentDetail',
            query: {
                id: id,
                type: type,
            }
        }).href, '_blank');
        window.scrollTo(0, 0)
    },

    //跳转到个人页
    toPersonPage(id, page) {
        window.open(router.resolve({
            path: '/PersonPage',
            query: {
                id: id,
                page: page
            }
        }).href, '_blank');
    },

    //跳转到发布页
    toIssuePage(info) {
        router.replace({
            path: '/IssueEditorPage',
            query: {
                info: info,
            }
        })
        window.location.reload();
        window.scrollTo(0, 0)
    },

    //跳转到登录页
    toLoginPage() {
        router.replace({
            path: '/Login',
        })
    },

    //跳转到每周番剧详情页
    toWeeklyBangumiDetail() {
        window.open(router.resolve({
            path: '/WeekLyBangumi',
        }).href, '_blank');
    }
}